const { DataTypes } = require("sequelize");
const sequelize = require("../../config/sequelize");
const Address = sequelize.define("address", {
    /**
     * 主键
    */
    id: {
       type: DataTypes.INTEGER,
       allowNull: false,
       primaryKey: true,
       autoIncrement: true,
    },
    /**
     * 地址编号
     */
    code: {
        type: DataTypes.STRING,
    },
    /**
     * 地址名称
     */
    name: {
        type: DataTypes.STRING,
    },
    /**
     * 父级地址编号
     */
    pcode: {
        type: DataTypes.STRING,
    },
    /**
     * 地址级别
     */
    level: {
        type: DataTypes.INTEGER,
    },
});
module.exports = Address;